home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{D3732FCB-1082-11D2-AB9F-000000000000}#1.0#0"; "PopupX-Trial.ocx"
- Begin VB.Form Form1
- BorderStyle = 3 'Fixed Dialog
- Caption = "US Area Codes"
- ClientHeight = 2895
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 3690
- Icon = "Form1.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2895
- ScaleWidth = 3690
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin PopupX_Evaluation.PopupMenu PopupMenu1
- Left = 2910
- Top = 2550
- _ExtentX = 847
- _ExtentY = 847
- ParentHwnd = 2548
- DataSource = "Data1"
- DataCol = "State"
- ItemDataCol = "AreaCode"
- End
- Begin VB.TextBox Text2
- DataField = "areacode"
- Height = 315
- Left = 2700
- TabIndex = 1
- Top = 300
- Width = 825
- End
- Begin VB.TextBox Text1
- DataField = "state"
- Height = 315
- Left = 60
- TabIndex = 0
- ToolTipText = "Right click here"
- Top = 300
- Width = 2535
- End
- Begin VB.Data Data1
- Caption = "Data1"
- Connect = "Access"
- DatabaseName = ""
- DefaultCursorType= 0 'DefaultCursor
- DefaultType = 2 'UseODBC
- Exclusive = 0 'False
- Height = 345
- Left = 90
- Options = 0
- ReadOnly = 0 'False
- RecordsetType = 1 'Dynaset
- RecordSource = ""
- Top = 2580
- Visible = 0 'False
- Width = 2295
- End
- Begin VB.Label Label3
- BorderStyle = 1 'Fixed Single
- Caption = $"Form1.frx":0442
- Height = 1575
- Left = 90
- TabIndex = 4
- Top = 840
- Width = 3495
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "&Area Code"
- Height = 195
- Left = 2700
- TabIndex = 3
- Top = 60
- Width = 750
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "&State"
- Height = 195
- Left = 60
- TabIndex = 2
- Top = 60
- Width = 375
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Form_Load()
- PopupMenu1.Enabled = True
- Data1.DatabaseName = App.Path & "\areacodes.mdb"
- Data1.RecordSource = "select * from areacodes order by state"
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Data1.Recordset.Close
- End Sub
- Private Sub PopupMenu1_MenuClick(ActiveMenu As String, Caption As String, itemdata As String)
- Text1.Text = Caption
- Text2.Text = itemdata
- End Sub
- Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If Button = vbRightButton Then
- PopupMenu1.ShowDBPopupMenu "States", X + Text1.Left, Y + Text1.Top
- End If
- End Sub
-